]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
blur-effect: Properly clear background framebuffer
authorJonas Dreßler <verdre@v0yd.nl>
Thu, 13 Feb 2020 12:08:28 +0000 (13:08 +0100)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Fri, 27 Mar 2020 22:31:57 +0000 (22:31 +0000)
We want to completely clear the background framebuffer when switching
back to ACTOR mode to make sure the `background_fb.framebuffer` check
will fail in `update_background_fbo` when switching to BACKGROUND mode
again. Otherwise the checks in `update_background_fbo` will return TRUE
and we will keep using the background framebuffer that was created
before switchig to ACTOR mode.

While at it, also clear the background framebuffer completely when
changing the actor to avoid the same issue here.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1000

src/shell-blur-effect.c

index eef071f869f957a427d15838b7dc5656d77eb1a2..c3fb3bc60e68cd69ae12cd0bd5d6aa1c1eb869c7 100644 (file)
@@ -513,6 +513,7 @@ shell_blur_effect_set_actor (ClutterActorMeta *meta,
 
   /* clear out the previous state */
   clear_framebuffer_data (&self->actor_fb);
+  clear_framebuffer_data (&self->background_fb);
   clear_framebuffer_data (&self->brightness_fb);
   clear_framebuffer_data (&self->blur[VERTICAL].data);
   clear_framebuffer_data (&self->blur[HORIZONTAL].data);
@@ -1049,7 +1050,7 @@ shell_blur_effect_set_mode (ShellBlurEffect *self,
   switch (mode)
     {
     case SHELL_BLUR_MODE_ACTOR:
-      clear_framebuffer (self->background_fb.framebuffer);
+      clear_framebuffer_data (&self->background_fb);
       break;
 
     case SHELL_BLUR_MODE_BACKGROUND: